<!--评论框-->

<?php if(($cancomment)  ==  "1"): ?><div class="input" model-node="comment_textarea">
    <div class="input_before1" model-node="mini_editor">
      <input type="hidden" id="app_detail_summary" value="<?php echo ($app_detail_summary); ?>" />
      <textarea class="input_tips" id="comment_inputor" event-node="mini_editor_textarea" hidefocus="true"  model-args='t=comment'></textarea>
      <div model-node="numsLeft" class="num"><?php echo ($initNums); ?></div>
    </div>
    <div class="action clearfix">
      <div class="right">
        <?php if(($canrepost)  ==  "1"): ?><!--[if !IE]><!-->
          <label>
            <input type="checkbox"  name="shareFeed" value="1" class="checkbox regular-checkbox" id="shareFeed"><span for="shareFeed"></span>
            <?php echo L('PUBLIC_SHARETO_STREAM');?></label>
         <!--<![endif]-->
         <!--[if IE]>
         <label>
            <input type="checkbox"  name="shareFeed" value="1" class="checkbox">
            <?php echo L('PUBLIC_SHARETO_STREAM');?></label>
         <![endif]--><?php endif; ?>
        <?php if($comment_origin == 1): ?>
        <!--[if !IE]><!--><label>
          <input type="checkbox" class="checkbox regular-checkbox" name="comment" value="1" id="comment"/>
          <span for="comment"></span>同时评论给原文作者&nbsp;<?php echo ($user_info["space_link_no"]); ?></label>
          <!--<![endif]-->
         <!--[if IE]>
         <label>
          <input type="checkbox" class="checkbox" name="comment" value="1" />
          同时评论给原文作者&nbsp;<?php echo ($user_info["space_link_no"]); ?></label>
          <![endif]-->
        <?php endif; ?>
        <a class="btn-green-small" href="javascript:void(0);"  event-node="do_comment"  event-args='row_id=<?php echo ($row_id); ?>&app_uid=<?php echo ($app_uid); ?>&app_row_id=<?php echo ($app_row_id); ?>&app_name=<?php echo ($app_name); ?>&table=<?php echo ($table); ?>&canrepost=<?php echo ($canrepost); ?>' to_comment_id="0" to_uid="0" to_comment_uname="" addtoend='0' ><span><?php echo L('PUBLIC_STREAM_REPLY');?></span></a></div>
      <div class="acts" id="acts"> <a class="face-block" href="javascript:;" event-node="comment_insert_face" title="表情"><i class="face"></i>表情</a> </div>
      <ul class="commoned_list">
        <!--<?php if(($canrepost)  ==  "1"): ?><li><label><input type="checkbox"  name="shareFeed" value="1" class="checkbox"><?php echo L('PUBLIC_SHARETO_STREAM');?></label><?php endif; ?>
      <?php if($comment_origin == 1): ?>
        <label><input type="checkbox" class="checkbox" name="comment" value="1" />同时评论给原文作者&nbsp;<?php echo ($user_info["space_link_no"]); ?></label></li>
      <?php endif; ?>-->
        <div class="clear"></div>
        <div model-node="faceDiv"></div>
      </ul>
    </div>
  </div>
  <?php else: ?>
  <div class="nologin">您还未登录，请<a class="nologin-a" href="javascript:ui.quicklogin();">&nbsp;登录</a>&nbsp;or&nbsp;<a class="nologin-a" href="<?php echo U('public/Register/index');?>">注册</a></div><?php endif; ?>

<!--评论列表-->
<?php if(($showlist)  ==  "1"): ?><div class="comment_lists" id="commentlist_<?php echo ($row_id); ?>">
    <?php if(is_array($list["data"])): ?><?php $i = 0;?><?php $__LIST__ = $list["data"]?><?php if( count($__LIST__)==0 ) : echo "" ; ?><?php else: ?><?php foreach($__LIST__ as $key=>$vo): ?><?php ++$i;?><?php $mod = ($i % 2 )?><dl class="comment_list" id="comment_list" model-node="comment_list">
        <dt><a href="<?php echo ($vo["user_info"]["space_url"]); ?>"><img width="20" height="20" src="<?php echo ($vo["user_info"]["avatar_middle"]); ?>"></a></dt>
        <dd>
          <p class="cont"> <?php echo ($vo["user_info"]["space_link"]); ?>：<em>
            <?php if($vo['is_audit'] || $vo['uid'] == $GLOBALS['ts']['mid']){ ?>
            <?php echo ($vo["content"]); ?>
            <?php }else{ ?>
            内容正在审核
            <?php } ?>
            <span class="time">(<?php echo (friendlydate($vo["ctime"])); ?>)</span>
            <span  class="handle">
              <?php $isdel = 0;
                if(($vo['uid'] == $GLOBALS['ts']['mid'] && CheckPermission('core_normal','comment_del')) || CheckPermission('core_admin','comment_del')){
                $isdel = 1; ?>
              <a href="javascript:void(0);" style="color:red;" event-node="comment_del" event-args="comment_id=<?php echo ($vo["comment_id"]); ?>" 
              <?php if($vo['user_info']['uid'] != $GLOBALS['ts']['mid'] && CheckPermission('core_admin','comment_del')){ ?>
              style="color:red;"
              <?php } ?>
              ><?php echo L('PUBLIC_STREAM_DELETE');?></a>
              <?php } ?>
              <?php if( $isdel && $cancomment){ ?>
              <?php } ?>
              <?php if(($cancomment)  ==  "1"): ?><a href="javascript:void(0)" event-args='row_id=<?php echo ($vo["row_id"]); ?>&app_uid=<?php echo ($vo["app_uid"]); ?>&to_comment_id=<?php echo ($vo["comment_id"]); ?>&to_uid=<?php echo ($vo["uid"]); ?>&to_comment_uname=<?php echo ($vo["user_info"]["uname"]); ?>&app_name=<?php echo ($app_name); ?>&table=<?php echo ($table); ?>' 
        event-node="reply_comment"><?php echo L('PUBLIC_STREAM_REPLY');?></a><?php endif; ?>
            </span>
            </em>
          </p>
         <!--  <p class="info right">
            <span>
              <?php $isdel = 0;
                if(($vo['uid'] == $GLOBALS['ts']['mid'] && CheckPermission('core_normal','comment_del')) || CheckPermission('core_admin','comment_del')){
                $isdel = 1; ?>
              <a href="javascript:void(0);" event-node="comment_del" event-args="comment_id=<?php echo ($vo["comment_id"]); ?>" 
              <?php if($vo['user_info']['uid'] != $GLOBALS['ts']['mid'] && CheckPermission('core_admin','comment_del')){ ?>
              style="color:red;"
              <?php } ?>
              ><?php echo L('PUBLIC_STREAM_DELETE');?></a>
              <?php } ?>
              <?php if( $isdel && $cancomment){ ?>
              <i class="vline">|</i>
              <?php } ?>
              <?php if(($cancomment)  ==  "1"): ?><a href="javascript:void(0)" event-args='row_id=<?php echo ($vo["row_id"]); ?>&app_uid=<?php echo ($vo["app_uid"]); ?>&to_comment_id=<?php echo ($vo["comment_id"]); ?>&to_uid=<?php echo ($vo["uid"]); ?>&to_comment_uname=<?php echo ($vo["user_info"]["uname"]); ?>&app_name=<?php echo ($app_name); ?>&table=<?php echo ($table); ?>' 
  			event-node="reply_comment"><?php echo L('PUBLIC_STREAM_REPLY');?></a><?php endif; ?>
            </span>
          </p> -->
        </dd>
      </dl><?php endforeach; ?><?php endif; ?><?php else: echo "" ;?><?php endif; ?>
    
    <!--页码-->
    <?php if(($list["html"])  !=  ""): ?><div id="page" class="page"> <?php echo ($list["html"]); ?> </div><?php endif; ?>
    <!--页码/end--> 
  </div><?php endif; ?>
<script>
var initNums = '<?php echo ($initNums); ?>';
atWho($("#comment_inputor"));
</script>